package com.csun.cmny.provider.service;

import com.csun.cmny.core.support.IService;
import com.csun.cmny.provider.model.domain.DmcCsunVersionSetDevice;
import com.csun.cmny.provider.model.domain.DmcDevice;

import java.util.List;

/**
 * @Auther: chisj chisj@foxmal.com
 * @Date: 2020-04-03 10:29
 * @Description: the interface dmc csun version set device service
 */
public interface DmcCsunVersionSetDeviceService extends IService<DmcCsunVersionSetDevice> {

    /**
     * batch update csun version set device stat
     *
     * @param versionSetId  the version set id
     * @param deviceIdList  the device id list
     * @param before    the before stat
     * @param stat      the stat
     *
     * @return  the int.
     */
    Integer batchUpdateStat(Long versionSetId, List<Long> deviceIdList, Integer before, Integer stat);

    /**
     * query device id list
     *
     * @param versionSetId  the version set id
     * @param stat          the stat
     *
     * @return  the list.
     */
    List<DmcDevice> queryDeviceIdList(Long versionSetId, int stat);

    /**
     * 批量更新设备升级状态
     *
     * @param dmcCsunVersionSetDeviceList   the list of dmc csun version set device
     *
     * @return  the int.
     */
    Integer batchUpdate(List<DmcCsunVersionSetDevice> dmcCsunVersionSetDeviceList);

    /**
     * update dmc csun version set device stat by task id
     *
     * @param taskId    the task id
     * @param stat      the stat
     *
     * @return  the int.
     */
    Integer updateByTaskId(String taskId, int stat);

    /**
     * update by time and stat
     *
     * @param time      the time
     * @param before    the before
     * @param after     the after
     *
     * @return  the int.
     */
    Integer updateByTimeAndStat(String time, int before, int after);
}
